import React, { useState, useEffect, useMemo, useCallback, useRef, createRef } from 'react';
import { Result, Tabs } from 'antd';
import styles from './index.less';
import { FormRender } from '@/core';

export default function(props: any) {
  const { config } = props;
  const { uid = 0, list = [], defaultValue = {} } = config;

  return (
    <div className={styles.attrSetting}>
      <div className={styles.tit}>属性设置</div>

      {list.length > 0 ? (
        <FormRender config={list} uid={uid} defaultValue={defaultValue} />
      ) : (
        <div style={{ paddingTop: '100px' }}>
          <Result status="404" />
        </div>
      )}
    </div>
  );
}
